/* (C) Copyright 2007, by Andrew Zhang */
package org.trafficman.trafficman_sample_test;

import org.punit.reporter.chart.OverviewReporter;
import org.punit.reporter.chart.image.ImageRender;
import org.punit.reporter.chart.pdf.PDFRender;
import org.punit.reporter.stream.file.FileLogger;
import org.punit.runner.ExecutorPoolImpl;
import org.punit.runner.SoloRunner;

public class RunnerSamples {
    public static void main(String[] args) {
        /*
         * Users can use either <code>SoloRunner</code> or <code>ConcurrentRunner</code>
         * to run any test classes and test suites. The reporters can be
         * configured by <code>runner.addEventListener(EventListener e)</code>,
         * including Console(default)/File/Image/PDF.
         * 
         * The result can be found in ./result/ folder.
         */
        SoloRunner runner = new SoloRunner();
        // runner = new ConcurrentRunner();
        runner.setExecutorPool(new ExecutorPoolImpl(5));
        runner.addEventListener(new FileLogger());
        runner.addEventListener(new OverviewReporter(new ImageRender()));
        runner.addEventListener(new OverviewReporter(new PDFRender()));
        runner.run(AllTestSuite.class);
    }
}
